# -*- mode: python -*-

block_cipher = None

# 主脚本路径（确保指向 client 目录内的正确位置）
client_main = r'Z:\myrepo\python\DN\client.py'

a = Analysis(
    [client_main],
    pathex=[r'Z:\myrepo\python\DN\client.py'],  # 使用原始字符串
    binaries=[],
    datas=[],
    hiddenimports=[],              # 补充动态导入的库
    hookspath=[],
    runtime_hooks=[],
    excludes=['server', 'flask'],          # 排除 server 相关和不必要的库
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False
)

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='DNtool',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,                   # 启用 UPX 压缩减小体积
    runtime_tmpdir=None,
    console=False,              # 设为 True 可显示控制台
    icon='images\sl.ico'        # 当前的相对路径 'images\sl.ico'
)
